IApi.Create method
Prepares to link a program to the KINGSTAR Subsystem.
Namespace: IntervalZero.KINGSTAR.Base.ApiAssembly: IntervalZero.KINGSTAR.Base.Api (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0
Syntax
KsError Create(
int Instance,
int IdealProcessor
)
Function Create(
Instance As Integer,
IdealProcessor As Integer
) As KsError
Parameters
Instance
Type: int
Selects which KINGSTAR Runtime instance you want to use when you have Multiple Master Package. If you don't have the package, set it to zero (0); if you have the package, the valid instance should be: 0 <= instance <= 63. The instance can be set according to your needs, for example: if you have three instances and want to use the third one, set it to two (2).
IdealProcessor
Type: int
Configures which core the KINGSTAR Subsystem runs on. All threads of the Subsystem run on the given processor. Core Zero is always for Windows. Other cores can be assigned to the Subsystem depending on your settings. By default, IdealProcessor is set to zero, meaning KINGSTAR will use the ideal processor configured in the instance configuration table (Control Panel > Runtime Settings > General Settings). If the table lacks settings for the given instance, the Subsystem may run on any core available to RTX64. If you set it to another number, such as two, the Subsystem will take the Core Two.
Return value
Type: KsError
A return code of a method.
Remarks
- This method should always be called first. All other methods will return error if Create has not been called.
- This method returns errNoLicense when Instance is greater than zero and no Multiple Master Package is activated. Since there is no Multiple Master Package, only the instance zero will be started.
- Multiple instances means you have multiple
ksRuntime.rtss
running at the same time and controlling different network cards. If you have Multiple Master Package, you can use several Create to create multiple instances. For example, you have three Create functions. They can use the instance zero, one, and two for each of them. If you don't have Multiple Master Package, you can use several Create to create only one instance, which is the instance zero. Several applications can link to one KINGSTAR Runtime, but one application can't link to several Runtimes. - One KINGSTAR Runtime = One
ksRuntime.rtss
. - Create cannot be called from a thread pool or background thread, because some RTX64 components cannot be initialized from these.
Examples
N/A
See also